import request from '@/utils/request'
const api = {}

//省级
api.getProvinceList = data => {
	return request({
    	url: `/base/admin/area/provinceList`,
        method: 'get',
        params: data
  	})
}

  //市级
api.getListAllCity   = data => {
	return request({
    	url: `/base/admin/area/cityList`,
        method: 'get',
        params: data
  	})
}


//区级
api.getListAllCounty  = data => {
	return request({
    	url: `/base/admin/area/countyList`,
        method: 'get',
        params: data  
  	})
}


api.save = data =>{
 return request({
      url: `/base/admin/area/save`,
        method: 'post',
        data
    }) 
}

api.get = (id,level) =>{
 return request({
      url: `/base/admin/area/get?id=${id}&level=${level}`,
        method: 'get'
    }) 
}

export default api